'''
# 当前最优工作线与原始工作线对比
'''
from torqueSrc.tools.loadFile import toLineRegressCsv, toAttrCsv, toLineRegressAttrCsv
import pandas as pd
from common.config import torqueConfig as Config
from toolsSrc.files.loadFiles import readLineCsvSetLegend



def lambdaOptCompareProcess():
    print('lineCompareProcess 进行中................')
    # 1. 两个曲线文件合并成一个文件，并用图例区分
    X = readLineCsvSetLegend(Config.originLambda, '原始工作曲线')
    X = pd.concat([X, readLineCsvSetLegend(Config.hisLambdaOptProcess, '最优工作曲线')] )
    X = pd.DataFrame(X, columns=[Config.WindSpeed, Config.RotateSpeed, '图例'])
    X.to_csv(Config.lambdaOptCompareProcess, index=False)

    # 2. 生成属性文件
    toLineRegressAttrCsv(Config.lambdaOptCompareProcess, Config.lambdaOptCompareAttr)
    print('lineCompareProcess 结束................')

if __name__ == '__main__':
    lambdaOptCompareProcess()






